package models

import "gorm.io/gorm"

type Course struct {
	gorm.Model
	UserId int     `gorm:"type:int(11)"`
	Title  string  `gorm:"type:varchar(200)"`
	Price  float64 `gorm:"type:decimal(10,2)"`
}
type Chapter struct {
	Id       int    `gorm:"type:int(11)"`
	CourseId int    `gorm:"type:int(11)"`
	Title    string `gorm:"type:varchar(200)"`
}
type Category struct {
	Id           int    `gorm:"type:int(11)"`
	ParentId     int    `gorm:"type:int(11)"`
	CategoryName string `gorm:"type:varchar(100)"`
}
type Review struct {
	Id       int `gorm:"type:int(11)"`
	CourseId int `gorm:"type:int(11)"`
	AdminId  int `gorm:"type:int(11)"`
	Status   int `gorm:"type:int(11)"`
}
type Admin struct {
	Id       int    `gorm:"type:int(11)"`
	Name     string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:char(32)"`
	Role     string `gorm:"type:varchar(30)"`
	Status   int    `gorm:"type:int(11)"`
}
type Message struct {
	Id         int    `gorm:"type:int(11)"`
	SenderId   int    `gorm:"type:int(11)"`
	ReceiverId int    `gorm:"type:int(11)"`
	Title      string `gorm:"type:varchar(200)"`
	Content    string `gorm:"type:varchar(500)"`
	IsRead     int    `gorm:"type:int(11)"`
}
type Tag struct {
	Id   int    `gorm:"type:int(11)"`
	Name string `gorm:"type:varchar(50)"`
}
type TagRelation struct {
	Id       int `gorm:"type:int(11)"`
	CourseId int `gorm:"type:int(11)"`
	TagId    int `gorm:"type:int(11)"`
}
type Comment struct {
	Id       int    `gorm:"type:int(11)"`
	LessonId int    `gorm:"type:int(11)"`
	UserId   int    `gorm:"type:int(11)"`
	Content  string `gorm:"type:varchar(500)"`
}
type User struct {
	gorm.Model
	Mobile   string `gorm:"char(11)"`
	Password string `gorm:"char(32)"`
}
